{% ifnotequal username None%}
<html>
<head>
    <title>单机命令执行</title>
{% include "systy.html" %}
</head>
<body>
{% include "head4.html" %}
<div class="cmd_div1">
    <div class="location_div">位置：命令执行 >> 单机命令执行 </div>
    <div class="cmd_div2">
        <form action="" method="post">
            <div class="cmd_div5">
                <select name="select" id="select">
                    <option selected value="-1">请选择服务器</option>
                    {% for ip in iplist %}
                        <option {% ifequal ipaddr  ip.ip%} selected {% endifequal %}value="{{ ip.id }}">{{ ip.ip }}</option>
                    {% endfor %}
                </select>
            </div>

            <div class="cmd_div6">
                <div class="col-lg-6">
                    <div class="input-group input-group-sm">
                      <input type="text"  name="cmd" id="cmd" class="form-control">
                      <span class="input-group-btn">
                        <button class="btn btn-default"  type="submit">Go!</button>
                      </span>
                    </div><!-- /input-group -->
                  </div><!-- /.col-lg-6 -->
            </div><!-- /.row -->
        </form>
    </div>
        
    <div class="cmd_div3">
        {% if RDATA %}
            <b>以下信息来自：{{ ipaddr }}</b></br>
            [{{USERNAME}}@{{hostname}} ~]# {{CMD}}</br>
        {% endif %}
        <div class="cmd_div3-1">
            {% for i in RDATA %}
                {{ i }}</br>
            {% endfor %}
        </div>
    </div>
</div>
<script type="text/javascript">
$(function(){
	$('#cmd').focus();
});


</script>

</body>
</html>
{% else %}
你无权访问，请<a href="/login.html">登陆!</a>
{% endifnotequal%}